package com.biglead.demo.controller;

import com.biglead.demo.common.R;
import com.biglead.demo.rabbit.test.delay.TestDelayedMQSender;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 订单 前端控制器
 * </p>
 *
 * @author 早起的年轻人
 * @since 2023-03-14
 */
@Api(tags = "订单测试模块")
@RestController()
@RequestMapping("/test/orders")
@Slf4j
public class OrderTestController {

    @Autowired
    TestDelayedMQSender delayedMQSender;

    @GetMapping("/send/delay")
    public R createPreOrder(@RequestParam(required = false,defaultValue = "10000")  Integer delayTime) {
        delayedMQSender.testSsend("测试延时消息了",delayTime);
        return R.ok();
    }

}
